package ru.ntcreb.csir.libs.methods.SVCH;

import ru.ntcreb.csir.libs.methods.SVCH.dto.SVCHImpulseDTO;
import ru.ntcreb.csir.libs.methods.SVCH.dto.TractDTO;

public class Main {

	public static void main(String[] args) {

		TractDTO tract = new TractDTO();
		tract.setApproximationCoefficient_K(0.7);
		tract.setApproximationCoefficient_N(0.5);
		tract.setStepness_S(0.005);
		tract.setVoltage_U0(0);

		TractService tr = new TractService();
		TractDTO tract2 = tr.createTractDTO(0.3, 0.35, 0, 0.009);

		// working
		double[] result = tr.createTractArray(tract);
		// working
		double[] result1 = tr.createParallelTwoTractsArray(tract, tract2);

		// working
		double[] result2 = tr.createConsistentTwoTractsArray(tract, tract2);

		for (int i = 0; i < result1.length; i++) {

			 System.out.println(result1[i]);

		}

		SVCHService svchServ = new SVCHService();
		// working
		SVCHImpulseDTO imp = svchServ.createSVCHImpulseDTO(500000, 60000,
				70000, 800000);
		double[] result3 = svchServ.createSVCHImpulse(imp);
		// working
		double[] result4 = svchServ.createTractSVCHReaction(result3, tract);

		for (int i = 0; i < result4.length; i++) {

			//System.out.println(result4[i]);
		}

		;

	}

}
